<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>六角灯笼</title>
  </head>
  <link rel="stylesheet" href="../common.css" />

  <style>
    body {
      transform-style: preserve-3d;
      perspective: 600px;
      perspective-origin: center center;
    }
    .t-3d {
      transform-style: preserve-3d;
    }

    .container {
      animation: rotate 10s linear infinite;
      height: 460px;
    }
    .box-top {
      position: relative;
      height: 40px;
      width: 100px;
    }
    .box-top-item {
      position: absolute;
      height: 40px;
      width: 100px;
      left: 0;
      top: 0;
      border: #e36d00 solid 4px;
      border-right-width: 2px;
      border-left-width: 2px;
      background: radial-gradient(#fffea1, #fffea1, #fbd342);
      transform-origin: center;
      overflow: hidden;
      transform: rotateY(var(--y)) translateZ(var(--z));
    }
    .box-top-item::before {
      content: "";
      position: absolute;
      top: -24px;
      left: -24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: solid 3px #e36d00;
      border-radius: 100%;
      -webkit-box-reflect: below 0;
    }
    .box-top-item::after {
      content: "";
      position: absolute;
      top: -24px;
      right: -24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: solid 3px #e36d00;
      border-radius: 100%;
      -webkit-box-reflect: below -3px;
    }
    .box-top-item-line {
      position: absolute;
      left: calc(50% - 40px);
      top: calc(50% - 10px);
      width: 80px;
      height: 20px;
      border: solid 3px #e36d00;
    }
    .box-center {
      position: relative;
      width: 80px;
      height: 150px;
    }
    .box-center-item {
      position: absolute;
      left: 0;
      top: 0;
      width: 80px;
      height: 150px;
      border: #e36d00 solid 4px;
      border-right-width: 2px;
      border-left-width: 2px;
      background: radial-gradient(#fffea1, #fffea1, #fbd342);
      transform-origin: center;
      overflow: hidden;
      transform: rotateY(var(--y)) translateZ(var(--z));
    }
    .box-center-item::before {
      content: "";
      position: absolute;
      top: -24px;
      left: -24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: solid 3px #e36d00;
      -webkit-box-reflect: below 106px;
    }
    .box-center-item::after {
      content: "";
      position: absolute;
      top: -24px;
      right: -24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: solid 3px #e36d00;
      -webkit-box-reflect: below 106px;
    }
    .box-center-item-line {
      position: absolute;
      width: 60px;
      height: 130px;
      left: calc(50% - 30px);
      top: calc(50% - 65px);
      border: solid 3px #e36d00;
    }
    .box-center-item span {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 40px;
      font-weight: bold;
      color: #f00;
    }
    .box-bottom {
      position: relative;
      height: 20px;
      width: 80px;
    }
    .box-bottom-item {
      position: absolute;
      left: 0;
      top: 0;
      height: 20px;
      width: 80px;
      background: radial-gradient(#fffea1, #fffea1, #fbd342);
      transform-origin: center;
      border: #e36d00 solid 4px;
      border-right-width: 2px;
      border-left-width: 2px;
      overflow: hidden;
      transform: rotateY(var(--y)) translateZ(var(--z));
    }
    .box-bottom-item::after {
      content: "";
      position: absolute;
      left: 10px;
      top: 5px;
      width: 60px;
      height: 130px;
      border: solid 3px #e36d00;
    }
    .box-bottom::before,
    .box-bottom::after {
      content: "";
      position: absolute;
      width: 2px;
      height: 90px;
      background: #f00;
      left: calc(50% - 1px);
      top: 18px;
    }
    .box-bottom::after {
      transform: rotateY(90deg);
    }
    .box-bottom .line-item {
      position: absolute;
      border-radius: 5px 5px 0 0;
      width: 10px;
      height: 60px;
      background: linear-gradient(
        #f00,
        #e36d00 3px,
        #fbd342 5px,
        #e36d00 8px,
        #e36d00 12px,
        #f00 16px,
        rgba(255, 0, 0, 0.8) 26px,
        rgba(255, 0, 0, 0.6)
      );
      left: calc(50% - 5px);
      top: 105px;
      transform: rotateY(var(--y));
    }
    .box-bottom .dot-box {
      position: absolute;
      left: 34px;
      width: 32px;
      top: 62px;
      height: 30px;
    }
    .box-bottom .dot-box-item {
      position: relative;
      width: 32px;
      height: 3px;
      background: #f00;
      box-shadow: 0px 5px #f00, 0px 10px #f00, 0px 15px #f00, 0px 20px #f00,
        0px 25px #f00;
      border-radius: 2px;
      transform: rotateZ(var(--z)) translateY(var(--y));
    }
    .box-bottom .dot-box-item::before {
      content: "";
      position: absolute;
      right: -5px;
      top: -7px;
      width: 10px;
      height: 10px;
      border: solid 2px #f00;
      border-radius: 50%;
      border-left-color: transparent;
      transform: rotate(calc(var(--z) * -1));
    }
    .box-bottom .dot-box-item::after {
      content: "";
      position: absolute;
      right: -13px;
      top: -15px;
      width: 24px;
      height: 24px;
      border: solid 2px #f00;
      border-left-color: transparent;
      border-radius: 50%;
      transform: rotate(calc(var(--z) * -1));
    }
    .box-bottom .dot-box-item.right::before {
      left: -5px;
      top: -7px;
      transform: rotate(calc(var(--z) * -1 + 180deg));
    }
    .box-bottom .dot-box-item.right::after {
      left: -13px;
      top: -15px;
      border-right-color: transparent;
      border-left-color: #f00;
    }
    .box-bottom .dot-box-item.right {
      margin-left: -18px;
    }

    .box-bottom-corn {
      position: absolute;
      top: 0px;
      left: 40px;
      width: 100px;
      height: 150px;
      transform-origin: left center;
      transform: rotateY(var(--y));
    }
    .box-bottom-corn::before {
      position: absolute;
      right: 0px;
      top: 0px;
      width: 20px;
      height: 15px;
      content: "";
      border: solid 3px #e36d00;
    }
    .box-bottom-corn::after {
      position: absolute;
      right: 8px;
      top: 10px;
      width: 10px;
      height: 15px;
      content: "";
      border: solid 3px #e36d00;
    }

    .box-top-corn {
      position: absolute;
      top: 0px;
      left: 48px;
      width: 120px;
      height: 150px;
      transform-origin: left center;
      transform: rotateY(var(--y));
    }
    .box-top-corn::before {
      position: absolute;
      right: 0px;
      top: 0px;
      width: 20px;
      height: 15px;
      content: "";
      border: solid 3px #e36d00;
    }
    .box-top-corn::after {
      position: absolute;
      right: 8px;
      top: 10px;
      width: 10px;
      height: 15px;
      content: "";
      border: solid 3px #e36d00;
    }
    .box-top-corn .line-dot {
      position: absolute;
      right: -6px;
    }
    .box-top-corn .line-dot::before {
      position: absolute;
      width: 6px;
      height: 3px;
      background: #e36d00;
      left: -6px;
      content: "";
    }
    .box-top-corn .line-dot::after {
      position: absolute;
      width: 2px;
      height: 40px;
      left: -1px;
      background: #f00;
      content: "";
    }
    .box-top-corn .line-dot .line-item {
      position: absolute;
      border-radius: 5px 5px 0 0;
      width: 10px;
      height: 60px;
      background: linear-gradient(
        #f00,
        #e36d00 3px,
        #fbd342 5px,
        #e36d00 8px,
        #e36d00 12px,
        #f00 16px,
        rgba(255, 0, 0, 0.8) 26px,
        rgba(255, 0, 0, 0.6)
      );
      left: calc(50% - 5px);
      top: 40px;
      transform: rotateY(var(--y));
    }
    @keyframes rotate {
      0% {
        transform: rotateY(0);
      }

      100% {
        transform: rotateY(-360deg);
      }
    }
    .box-top-item,
    .box-center-item,
    .box-bottom-item {
      animation: twinkle 2s ease-in-out infinite;
    }

    @keyframes twinkle {
      0% {
        box-shadow: rgba(0, 0, 0, 0.1) 0 0 1px;
      }

      50% {
        box-shadow: #fffea1 0 0 20px;
      }

      100% {
        box-shadow: rgba(0, 0, 0, 0.1) 0 0 1px;
      }
    }
    .box-head {
      width: 2px;
      background: #f00;
      height: 100px;
      transform: rotateY(var(--y));
      position: relative;
    }
    .box-head::before {
      position: absolute;
      content: "";
      width: 16px;
      height: 14px;
      border-radius: 5px;
      position: absolute;
      top: 0;
      left: calc(50% - 8px);
      background: linear-gradient(
        #f00,
        #e36d00 3px,
        #fbd342 5px,
        #e36d00 8px,
        #e36d00 12px,
        #f00 16px,
        rgba(255, 0, 0, 0.8) 26px,
        rgba(255, 0, 0, 0.6)
      );
    }
    .box-head.bt {
      position: absolute;
    }
    .box-head.bt::before {
      display: none;
    }
  </style>

  <body>
    <div class="container flex-column t-3d">
      <div class="box-head" style="--y: 0deg"></div>
      <div class="box-head bt" style="--y: 60deg"></div>
      <div class="box-top t-3d">
        <div class="box-top-item" style="--y: 0deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-item" style="--y: 60deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-item" style="--y: 120deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-item" style="--y: 180deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-item" style="--y: -120deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-item" style="--y: -60deg; --z: 86px">
          <div class="box-top-item-line"></div>
        </div>
        <div class="box-top-corn" style="--y: 0deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
        <div class="box-top-corn" style="--y: 60deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
        <div class="box-top-corn" style="--y: 120deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
        <div class="box-top-corn" style="--y: 180deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
        <div class="box-top-corn" style="--y: 240deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
        <div class="box-top-corn" style="--y: 300deg">
          <div class="line-dot">
            <div class="line-box t-3d">
              <div class="line-item" style="--y: 0deg"></div>
              <div class="line-item" style="--y: 60deg"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="box-center t-3d">
        <div class="box-center-item" style="--y: 0deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>兔</span>
        </div>
        <div class="box-center-item" style="--y: 60deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>年</span>
        </div>
        <div class="box-center-item" style="--y: 120deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>大</span>
        </div>
        <div class="box-center-item" style="--y: 180deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>吉</span>
        </div>
        <div class="box-center-item" style="--y: -120deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>20</span>
        </div>
        <div class="box-center-item" style="--y: -60deg; --z: 69px">
          <div class="box-center-item-line"></div>
          <span>23</span>
        </div>
      </div>
      <div class="box-bottom t-3d">
        <div class="box-bottom-item" style="--y: 0deg; --z: 69px"></div>
        <div class="box-bottom-item" style="--y: 60deg; --z: 69px"></div>
        <div class="box-bottom-item" style="--y: 120deg; --z: 69px"></div>
        <div class="box-bottom-item" style="--y: 180deg; --z: 69px"></div>
        <div class="box-bottom-item" style="--y: -120deg; --z: 69px"></div>
        <div class="box-bottom-item" style="--y: -60deg; --z: 69px"></div>
        <div class="line-box t-3d">
          <div class="line-item" style="--y: 0deg"></div>
          <div class="line-item" style="--y: 60deg"></div>
        </div>
        <div class="dot-box t-3d">
          <div class="dot-box-item" style="--z: 45deg; --y: 2px"></div>
          <div class="dot-box-item right" style="--z: -45deg; --y: -2px"></div>
        </div>
        <div class="box-bottom-corn" style="--y: 0deg"></div>
        <div class="box-bottom-corn" style="--y: 60deg"></div>
        <div class="box-bottom-corn" style="--y: 120deg"></div>
        <div class="box-bottom-corn" style="--y: 180deg"></div>
        <div class="box-bottom-corn" style="--y: 240deg"></div>
        <div class="box-bottom-corn" style="--y: 300deg"></div>
      </div>
    </div>
  </body>
</html>
